import 'package:flutter/material.dart';
import 'package:flutter_test_demo/static/colors/MyColors.dart';
import 'package:webview_flutter/webview_flutter.dart';


class NetWorkPage extends StatelessWidget {
  final String str; 
  const NetWorkPage({Key key, @required this.str}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    String keyName = "https://www.baidu.com/s?wd=${this.str}";
    return Scaffold(
      appBar: AppBar(
        title: Text("关键字搜索"),
        backgroundColor: MyColor.titleColor,
        centerTitle: true
      ),
      body: Container(
        child: WebView(
          initialUrl:keyName
        ),
      ),
    );
  }
}